<template>
  <div>
    <div class="mybrand"
    v-for="item in home.bastBanner"
    v-bind:key="item.id">
      <div class="sale">
        <span>品牌特卖</span>
      </div>
      <div class="brand-img">
        <img
          :src="item.path"
        />
      </div>
    </div>
  </div>
</template>


<script>
import { mapState } from "vuex";
export default {
  computed: {
    ...mapState(["home"]),
  },
};
</script>

<style lang="less">
.mybrand {
  width: 365px;
  height: 150px;
  background: #fff;
  border-radius: 10px;
  margin-left: 5px;
  margin-right: 10px;
  margin-top: 10px;
  position: relative;
  .sale {
    position: absolute;
    width: 60px;
    height: 30px;
    line-height: 30px;
    font-size: 15px;
    color: #fff;
    border-top-left-radius: 10px;
    background: #a529ee;
    padding-left: 10px;
    padding-right: 10px;
    z-index: 1001;
    ::after {
      position: absolute;
      content: "";
      display: inline-block;
      width: 0px;
      height: 0px;
      border-top: 30px solid #a529ee;
      border-right: 10px solid transparent;
      margin-left: 10px;
    }
  }
  .brand-img {
    width: 365px;
    height: 150px;
    position: absolute;
    border-radius: 10px;
    img {
      width: 100%;
      height: 100%;
      display: block;
      border-radius: 10px;
    }
  }
}
</style>